<extend name="Layout/layout"/>
<block name="style">
<style>
.fbutton{
    color: rgba(255, 255, 255, .9);
    background: #1E9FFF;
    display: inline-block;
    vertical-align: middle;
    font-size: 14px;
    transition: all .2s;
    -webkit-transition: all .2s;
    position: relative;
    line-height: 40px;
    min-width: 65px;
    padding: 0 15px;
    text-align: center;
    cursor: pointer;
}
</style>
</block>
<block name="body">

	<!-- 标题栏 -->
	<div class="main-title" style="float:left;">
		<h2>权限管理</h2>
	</div>
    <div class="cf" style="float:left; margin-left:20px;">
        <a id="add-group" class="fbutton btn" href="{:U('createGroup')}">新增用户组</a>
        <a onclick="javascript:void(0);" date-href="{:U('changestatus',array('method'=>'resumeGroup'))}" class="fbutton btn ajax-post fly-ajax-get" date-type="All" target-form="ids" >启 用</a>
        <a onclick="javascript:void(0);" date-href="{:U('changestatus',array('method'=>'forbidGroup'))}" class="fbutton btn ajax-post fly-ajax-get" date-type="All" target-form="ids" >禁 用</a>
        <a onclick="javascript:void(0);" class="fbutton btn ajax-post confirm" date-href="{:U('changestatus',array('method'=>'deleteGroup'))}" date-type="All"  target-form="ids" >删 除</a>
    </div>

	<!-- 数据列表 -->
	<div class="data-table table-striped">
        <form class="ids">
            <table class="layui-table" lay-even="">
                <colgroup>
                    <col width="60">
                    <col width="200">
                    <col width="400">
                    <col>
                    <col>
                    <col>
                </colgroup>
                <thead>
	                <tr>
	                    <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
	                    <th>用户组</th>
	                    <th>描述</th>
	                    <th>授权</th>
	                    <th>状态</th>
	                    <th>操作</th>
	                </tr>
                </thead>
                <tbody>
                    <notempty name="_list">
						<volist name="_list" id="vo">
                            <tr>
					            <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}" /></td>
								<td><a href="{:U('AuthManager/editgroup?id='.$vo['id'])}">{$vo.title}</a> </td>
								<td><span>{:mb_strimwidth($vo['description'],0,60,"...","utf-8")}</span></td>


								<td><a href="{:U('AuthManager/access?group_name='.$vo['title'].'&group_id='.$vo['id'])}" >访问授权</a>
								<!--a href="{:U('AuthManager/category?group_name='.$vo['title'].'&group_id='.$vo['id'])}" >分类授权</a-->
								<a href="{:U('AuthManager/user?group_name='.$vo['title'].'&group_id='.$vo['id'])}" >成员授权</a>
								</td>
								<td>{$vo.status_text}</td>
								<td><eq name="vo.status" value="1">
									<a href="{:U('AuthManager/changeStatus?method=forbidGroup&id='.$vo['id'])}" class="ajax-get">禁用</a>
									<else/>
									<a href="{:U('AuthManager/changeStatus?method=resumeGroup&id='.$vo['id'])}" class="ajax-get">启用</a>
									</eq>
									<a href="{:U('AuthManager/editgroup?id='.$vo['id'])}" class="confirm ajax-get">编辑</a>
									<a onclick="javascript:void(0);" class="confirm ajax-get" title="删除" date-href="{:U('changestatus',array('method'=>'deleteGroup','id'=>$vo['id']))}">删除</a>
					                </td>
							</tr>
                        </volist>
                    <else/>
                        <td colspan="6" class="text-center"> aOh! 暂时还没有内容! </td>
                    </notempty>
                </tbody>
            </table>
        </form>
        <!-- 分页 -->
        <div class="page">
            {$_page}
        </div>
    </div>
</block>

<block name="script">
<script type="text/javascript" charset="utf-8">
    //导航高亮
    //highlight_subnav('{:U('AuthManager/index')}');
</script>
</block>
